import VueRouter from "vue-router";
import HmCollect from "@/views/HmCollect.vue";
import HmDetail from "@/views/HmDetail.vue";
import HmLayout from "@/views/HmLayout.vue";
import HmLogin from "@/views/HmLogin.vue";
import HmMine from "@/views/HmMine.vue";
import HmResgiter from "@/views/HmResgiter.vue";
import HmView from "@/views/HmView.vue";
import HmMian from "@/views/HmMian.vue";

const router = new VueRouter({
  routes: [
    {
      path: "/",
      redirect: "/login",
    },
    // {
    //   path: "/",
    //   redirect: "/layout/mian",
    // },
    {
      path: "/login",
      component: HmLogin,
    },
    {
      path: "/resgiter",
      component: HmResgiter,
    },
    {
      path: "/layout",
      component: HmLayout,
      children: [
        {
          path: "/layout/mian",
          component: HmMian,
        },
        {
          path: "/layout/collect",
          component: HmCollect,
        },
        {
          path: "/layout/view",
          component: HmView,
        },
        {
          path: "/layout/mine",
          component: HmMine,
        },
      ],
    },
    {
      path: "/detail",
      component: HmDetail,
    },
  ],
});
export default router;
